1   package uba.db.sql.language;
2   
3   import junit.framework.TestCase;
4   import uba.db.testhelpers.TestUtils;
5   
6   /***
7    * Test de unidad para {@link uba.db.sql.language.IntegerValue}.
8    * 
9    * @version $Revision: 1.2 $
10   */
11  public class IntegerValueTest extends TestCase {
12      /***
13       * Test de igualdad entre dos instancias.
14       */
15      public void testEquals() throws Exception {
16          TestUtils.assertEqualsImplementation(new IntegerValue(1),
17                                               new IntegerValue("1"),
18                                               new IntegerValue(2));
19      }
20  
21      /***
22       * Test: evaluar el valor en un contexto.
23       */
24      public void testValueWith() throws Exception {
25          EvaluationContext context = new MockEvaluationContext();
26          IntegerValue intValue = new IntegerValue(2);
27          assertEquals(new Integer(2), intValue.valueWith(context));
28      }
29  }